package com.springcloud.configclient.configclient.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description:
 * @see:com.springcloud.configclient.controller
 * @author:xuan
 * @createTime:2020/12/15 20:21
 * @version:1.0
 */
@RestController
public class HelloController {

    @Value("${springcloud.hello}")  //使用@Value注解来获取server端参数的值
    private String hello;

    @RequestMapping("/hello")
    public String from() {
        return this.hello;
    }
}
